package com.zpark.controller;

import com.zpark.pojo.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @PackageName: com.zpark.controller
 * @ClassName: UserController
 * @Description:
 * @author: RZS
 * @date: 2024/4/17  9:27
 */
@RestController
@RequestMapping("/server")
public class UserController {

    @Value("${server.port}")
    private String port;

    @Value("${user.uname}")
    private String uname;

    @Value("${user.pwd}")
    private String pwd;

    @GetMapping("/get")
    public User getUser(){
        User user = new User();
        user.setUname(uname);
        user.setPwd(pwd);
        user.setPort(port);

        return user;
    }
}
